package cn.com.homeyoda.aimate.aihealth.app;


import cn.com.homeyoda.aimate.aihealth.data.ApiService;
import cn.com.homeyoda.aimate.aihealth.data.HttpDataSource;
import cn.com.homeyoda.aimate.aihealth.data.Repository;
import cn.com.homeyoda.aimate.aihealth.data.RetrofitClient;
import cn.com.homeyoda.aimate.aihealth.data.service.HttpDataSourceImpl;
import cn.com.homeyoda.aimate.aihealth.data.service.LocalDataSource;
import cn.com.homeyoda.aimate.aihealth.data.service.LocalDataSourceImpl;

public class Injection {
    public static Repository provideDemoRepository() {
        ApiService apiService = RetrofitClient.getInstance().create(ApiService.class);
        HttpDataSource httpDataSource = HttpDataSourceImpl.getInstance(apiService);
//-------------------------------------------------------
        LocalDataSource localDataSource = LocalDataSourceImpl.getInstance();

        return Repository.getInstance(httpDataSource, localDataSource);
    }
}
